﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using PCC.Framework.Utils;
using PCC.Framework.Model;

namespace TestApp
{
    class Class2
    {
        static void Main2(string[] args)
        {
            BulletinItem model = new BulletinItem();
            model.BulletinID = "r2001";
            model.BulletinTitle = "金逸资讯";
            model.BulletinContent = "详情请见附件";
            model.AttachList = new List<Attachment> { 
                new Attachment{ AttachName="2011_09_12.pdf", AttachUrl="www.baidu.com"}
            };

            string modelJson = JsonHelper.ToJson(model);

            Console.WriteLine(modelJson);

            object o = JsonHelper.FromJson(modelJson);

            model = JsonHelper.FromJson<BulletinItem>(modelJson);

            string ret = XmlHelper.GetXML<BulletinItem>(model);

            ret = XmlHelper.GetXML<BulletinItem>(model);

            BulletinItem model2 = XmlHelper.GetModel<BulletinItem>(ret);

            Console.WriteLine(ret);

            object m = ParseHelper.Parse<string>(null);

            Console.Read();
        }
    }
}
